<html>
<head>
<style>
	div
	{
		margin:0 auto;
		border-style: solid;
	}
	body
	{
		width:100%;height:100%;
	}
	#div1
	{
		width:80%;height:40%;
		
	}
	#div2
	{
		width:80%;height:60%;
	}
	iframe
	{
		width:100%;height:100%
	}
</style>
</head>
<body>
	<div id="div1"> Hello </div>
	<div id="div2">
		<iframe id="ifm" src="sample.html" onclick="test(event)"></iframe>
	</div>
		<script>
		var iframe = document.getElementById('ifm');
		iframe.onload = function() {
			iframe.contentDocument.onclick = function () {
			var obj=iframe.contentDocument.elementFromPoint(iframe.contentWindow.event.clientX,iframe.contentWindow.event.clientY);
			alert(obj.innerHTML);
			};
		}
		</script>
	
</body>
</html>